import java.io.File;
public class project12 {
    public static void main(String[] args) {
        String path="E:\\湖北师范大学\\test.txt";
        File file=new File(path);
        if(file.exists()){
            boolean result=file.delete();
            if(result){
                System.out.println("文件删除成功");
            }else{
                System.out.println("文件删除失败");
            }
        }
    }
}
